package com.etennis.controller;

import com.etennis.pojos.PageResult;
import com.etennis.pojos.ResponseResult;
import com.etennis.pojos.dto.web.RecordsPageQueryDTO;
import com.etennis.pojos.vo.web.RecordsVO;
import com.etennis.service.IRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/web/records")
@Slf4j
@Api(tags = "网页端-战绩管理接口")
public class RecordsController {
    @Autowired
    IRecordService iRecordService;

    @GetMapping("/page")
    @ApiOperation("分页展示选手战绩")
    public ResponseResult<PageResult<RecordsVO>> page(RecordsPageQueryDTO recordsPageQueryDTO){
        PageResult<RecordsVO> page = iRecordService.pageMember(recordsPageQueryDTO);
        return ResponseResult.okResult(page);
    }
}
